import java.util.Vector;

public class Comment {
  private String commentID;
  private String comment;
  private String author;
  private String date;
  private String parentID;
  private String issue;
  private Vector<Opinion> opinions;
  int cumulativePolarity;

  public Comment(String id, String comment, String author, String date,
      String parent, String issue) {
    this.commentID = id;
    this.comment = comment;
    this.author = author;
    this.date = date;
    this.parentID = parent;
    this.issue = issue;
    opinions = new Vector<Opinion>();
    cumulativePolarity = 0;
  }

  public String getCommentID() {
    return commentID;
  }

  public void setCommentID(String commentID) {
    this.commentID = commentID;
  }

  public String getComment() {
    return comment;
  }

  public void setComment(String comment) {
    this.comment = comment;
  }

  public String getAuthor() {
    return author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }

  public String getDate() {
    return date;
  }

  public void setDate(String date) {
    this.date = date;
  }

  public String getParentId() {
    return parentID;
  }

  public void setParentId(String parent) {
    this.parentID = parent;
  }

  public boolean isPolaritySet() {
    return opinions.size() != 0;
  }

  public Vector<Opinion> getOpinions() {
    return opinions;
  }

  public void addOpinion(Opinion p) {
    opinions.add(p);
    cumulativePolarity += p.getPolarity();
  }

  public int getCumulativePolarity() {
    return cumulativePolarity;
  }

  public String getIssue() {
    return issue;
  }

  public void setIssue(String issue) {
    this.issue = issue;
  }
}